package com.ayu.shortlink.settlement.dao.entity;

import com.ayu.shortlink.settlement.common.database.BaseDO;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * 订单实体
 */
@Data
@TableName("t_order")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class OrderDO extends BaseDO {

    /**
     * id
     */
    private Long id;

    /**
     * 订单号
     */
    private String orderSn;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 使用的优惠券ID
     */
    private Long couponTemplateId;

    /**
     * 用户优惠券ID
     */
    private Long userCouponId;

    /**
     * 购买的商品编码ID
     */
    private Long goods;

    /**
     * 订单状态 @link TradeStatusEnum
     */
    private Integer status;

    /**
     * 交易总金额
     */
    private BigDecimal totalAmount;

    /**
     * 优惠金额(默认为0)
     */
    private BigDecimal discountAmount;

    /**
     * 已支付金额
     */
    private BigDecimal payAmount;
}